<#include "../header.ftl" />
<#if w?has_content>
	<@head title="${w} - 搜索${sitename}"/>
<#else>
	<@head title="搜索 - ${sitename}"/>
</#if>
<@nav />
	<div class="container">
		<div class="grid grid-15">
			<div class="tab">
				<ul class="tab-title clearfix">
			   		<li class="tab-title-item"><a href="javascript:void(0);" data-toggle="tab">资讯</a></li>
			   		<li class="tab-title-item active"><a href="${base}/search?scope=post&w=${w!""}" data-toggle="tab">文章</a></li>
			 	</ul>
			</div>
			<div class="box">
				<div class="box-title">搜索结果</div>
			   	<div class="box-body">
			   		<div class="typo-p">
			   			<div id="medias" class="sep">
			   				<#if page?exists && (page.result?size > 0)><#list page.result as news>
			   				<div class="media">
		   						<div class="media-body">
		   							<div class="media-body-title">
		   								<strong><a href="${base}/news/${news.id}" target="_blank">${news.title}</a></strong>
		   								<small class="pull-right">${news.createTime?string("yyyy-MM-dd hh:mm:ss")}</small>
		   							</div>
		   							<p class="typo-p"><@contentTransform content="${news.content}" removeHtml=true substring=true endIndex=200 /></p>
		   						</div>
			   				</div>
			   				</#list></#if>
			   			</div>
			   		</div>
			   		<#if (page.totalPages > 1)>
                        <@web.pagenavi pageEntity=page baseUrl=base + "/search?scope=news&w=" + w + "&pageNo=$page$" />
                    </#if>
			   	</div>
			</div>
		</div>
		<div class="grid grid-5 last">
			<div class="box">
				<div class="box-title">热门资讯</div>
			   	<div class="box-body">
			   		<div class="typo-p">
			   			<@m.widget path="/widget/news/hot" idle=600/>
			   		</div>
			   	</div>
			</div>
		</div>
	</div>
<#include "../footer.ftl" />